Packet processing method, device, and system

ABSTRACT

A packet processing method, a device, and a system are disclosed. In the method, a first provider edge (PE) device receives a first virtual extensible local area network (VXLAN) packet through a first point-to-point (P2P) VXLAN tunnel between the first PE device and a third PE device A customer edge (CE) device is dual-homed to the first PE device and a second PE device respectively through a first Ethernet link and a second Ethernet link. The first PE device forwards the first VXLAN packet to the second PE device through a third P2P VXLAN tunnel from the first PE device to the second PE device when there is a fault on the first Ethernet link. The first Ethernet link connected to the first PE device and a link formed by the third P2P VXLAN tunnel and the second Ethernet link have a primary/secondary relationship.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2018/110413, filed on Oct. 16, 2018, which claims priority toChinese Patent Application No. 201710961377.7, filed on Oct. 17, 2017.The disclosures of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the field of communications technologies,and in particular, to a packet processing method, a device, and asystem.

BACKGROUND

An Ethernet virtual private network (EVPN) is a layer 2 virtual privatenetwork (VPN) technology. The EVPN connects customer sites in differentregions by using an Internet protocol (IP)/multiprotocol label switching(MPLS) bearer network, which is equivalent to that these customer sitesare in a same local area network (LAN).

A virtual private wire service (VPWS) may be also referred to as avirtual leased line (VLL). The VPWS refers to a layer 2 service bearertechnology used to simulate, as truly as possible in a packet switchednetwork (PSN), basic behavior and a basic feature of services such as anasynchronous transfer mode (ATM), a frame relay (FR), the Ethernet, alow-speed time division multiplexing (TDM) circuit, and a synchronousoptical network (SONET)/a synchronous digital hierarchy (SDH).

In an EVPN-VPWS network scenario, node devices no longer need totransmit a pseudo wire (PW) signal to each other. When a fault occurs onthe node device or a link, the EVPN-VPWS network may implementrelatively quick protection convergence.

In an actual application scenario, when a fault occurs on an attachmentcircuit (AC) side link of the EVPN-VPWS network, a provider edge (PE)device connected to the AC side link perceives the fault of an AC sideport, and instructs, by using an EVPN route, a remote PE device toperform primary/secondary link switching. Because a fault perceivingprocess and an EVPN route notification process are relatively long, apacket loss occurs in data traffic sent by the remote PE device to thePE device connected to the AC side link.

SUMMARY

Embodiments of the application provide a packet processing method, adevice, and a system, which are applied to an EVPN-VPWS network. When afault is detected on an AC side link, a PE device connected to thefaulty AC side link implements data traffic bypassing, which helps toreduce a packet loss of data traffic in a transmission process.

The embodiments of the application provide the following technicalsolutions.

In at least one embodiment, a packet processing method is provided. Themethod is applied to an EVPN-VPWS network, and the EVPN-VPWS networkincludes a first PE device, a second PE device and a third PE device.The first PE device receives a first virtual extensible local areanetwork (VXLAN) packet through a first point-to-point (P2P) virtualextensible local area network (VXLAN) tunnel between the first PE deviceand the third PE device. The first VXLAN packet is a VXLAN packet sentby the third PE device to a customer edge (CE) device via the first P2PVXLAN tunnel, the first PE device, and a first Ethernet link. The CEdevice is dual-homed to the first PE device and the second PE devicerespectively through the first Ethernet link and a second Ethernet link.The first Ethernet link and the second Ethernet link form an Ethernetsegment (ES). The first PE device forwards the first VXLAN packet to thesecond PE device through a third P2P VXLAN tunnel from the first PEdevice to the second PE device when the first PE device determines thatthere is a fault on the first Ethernet link. The first Ethernet linkconnected to the first PE device and a link formed by the third P2PVXLAN tunnel and the second Ethernet link have a primary/secondaryrelationship.

In at least one embodiment, in an EVPN-VPWS network scenario, when thefirst PE device perceives that an AC side link connected to the first PEdevice is faulty, the first PE device may forward the received firstVXLAN packet from the third PE device through the established third P2PVXLAN tunnel. After receiving the first VXLAN packet, the second PEdevice sends the first VXLAN packet to a first CE device. Therefore,transient traffic bypassing is implemented, which helps to reduce apacket loss of data traffic in a transmission process.

In at least one embodiment, before the first PE device receives thefirst VXLAN packet through the first P2P VXLAN tunnel, the first PEdevice receives a first Ethernet auto-discovery per EVPN instance (EVI)route sent by the second PE device. The first Ethernet A-D per EVI routeincludes an Ethernet segment identifier (ESI) and an Ethernet tagidentifier (Ethernet Tag ID). The ESI is used to indicate the ES, andthe Ethernet Tag ID includes a local VPWS instance identifier and aremote VPWS instance identifier of the second PE device. When the ESI inthe first Ethernet A-D per EVI route is the same as an ESI stored on thefirst PE device, the local VPWS instance identifier of the second PEdevice in the first Ethernet A-D per EVI route is the same as a localVPWS instance identifier of the first PE device, and the remote VPWSinstance identifier of the second PE device in the first Ethernet A-Dper EVI route is the same as a remote VPWS instance identifier of thefirst PE device, the first PE device establishes the third P2P VXLANtunnel from the first PE device to the second PE device.

In at least one embodiment, the first PE device may automaticallyestablish the third P2P VXLAN tunnel from the first PE device to thesecond PE device. Similarly, the second PE device may also automaticallyestablish a fourth P2P VXLAN tunnel from the second PE device to thefirst PE device.

In at least one embodiment, the first PE device forwards the first VXLANpacket to the second PE device through a third P2P VXLAN tunnel when thefirst PE device determines that there is a fault on the first Ethernetlink includes the following: When there is a fault on the first Ethernetlink, the first PE device blocks a port of the first PE device forconnecting to the first Ethernet link, and enables a port of the firstPE device for connecting to the third P2P VXLAN tunnel; and the first PEdevice forwards the first VXLAN packet to the CE device through thethird P2P VXLAN tunnel and the second Ethernet link.

In at least one embodiment, the method further includes the following:when the first Ethernet link is recovered from the fault, the first PEdevice enables the port of the first PE device for connecting to thefirst Ethernet link, and blocks the port of the first PE device forconnecting to the third P2P VXLAN tunnel; and the first PE devicereceives a second VXLAN packet from the third PE device, and forwardsthe second VXLAN packet to the CE device through the first Ethernetlink.

In at least one embodiment, when the fault on the first Ethernet link isremoved, the first PE device may stop traffic bypassing in time.

In at least one embodiment, the first Ethernet link and the secondEthernet link are multi-chassis trunk (MC-Trunk) links. The firstEthernet link is a primary link, the second Ethernet link is a secondarylink, the first PE device is a primary device, and the second PE deviceis a secondary device. When there is a fault on the first Ethernet link,the method further includes the following: The first PE device sends afirst MC-Trunk packet to the second PE device, where the first MC-Trunkpacket is used to notify the second PE device that the first Ethernetlink is faulty; and the first PE device sends a second Ethernet A-D perEVI route to the third PE device, where the second Ethernet A-D per EVIroute carries a P identifier and a B identifier, and the P identifier isnot set and the B identifier is set, which is used to indicate that thefirst PE device is switched from a primary device to a secondary device.

In at least one embodiment, when the first Ethernet link is recoveredfrom the fault, the method further includes the following: The first PEdevice sends a third Ethernet A-D per EVI route to the third PE device,where the third Ethernet A-D per EVI route carries a P identifier and aB identifier, and the P identifier is set and the B identifier is notset, which is used to indicate that the first PE device is switched froma secondary device to a primary device; the first PE device receives athird VXLAN packet through the fourth P2P VXLAN tunnel, where the thirdVXLAN packet is a VXLAN packet sent by the third PE device to the CEdevice via the second P2P VXLAN tunnel, the second PE device, and thesecond Ethernet link, and the fourth P2P VXLAN tunnel is a P2P VXLANtunnel from the second PE device to the first PE device; and the firstPE device forwards the third VXLAN packet to the CE device through thefirst Ethernet link.

Optionally, the first Ethernet link and the second Ethernet link areboth primary links, and the first PE device and the second PE device areconfigured to receive traffic from the third PE device in a trafficbalancing manner.

Further, optionally, the first PE device sends an Ethernetauto-discovery per Ethernet segment (Ethernet A-D per ES) withdrawalroute to the third PE device through the first P2P VXLAN tunnel.

In at least one embodiment, a first PE device is provided, and the firstPE device has functions of implementing behavior of the first PE devicein the foregoing method. The functions may be implemented by hardware,or may be implemented by hardware by executing corresponding software.The hardware or the software includes one or more modules correspondingto the foregoing functions.

In a possible design, a structure of the first PE device includes aprocessor and an interface. The processor is configured to support thefirst PE device in performing corresponding functions in the foregoingmethod. The interface is configured to support communication between thefirst PE device and a second PE device, or is configured to supportcommunication between the first PE device and a third PE device, andsend information or an instruction related to the foregoing method tothe second PE device or the third PE device, or receive information oran instruction related to the foregoing method from the second PE deviceor the third PE device. The first PE device may further include amemory. The memory is configured to be coupled to the processor, andstore a program instruction and data for the first PE device.

In another possible design, the first PE device includes a processor, atransmitter, a random access memory, a read-only memory, and a bus. Theprocessor is separately coupled to the transmitter, the random accessmemory, and the read-only memory by using the bus. When the first PEdevice needs to be run, a basic input/output system or a bootloader inan embedded system that is built into the read-only memory is used tolead a system to start, and lead the first PE device to enter a normalrunning state. After entering the normal running state, the first PEdevice runs an application program and an operating system in the randomaccess memory, so that the processor performs embodiments of the methodas described herein.

In at least one embodiment, a first PE device is provided, and the firstPE device includes a main control board and an interface board, and mayfurther include a switching board. The first PE device is configured toperform embodiments of the method as described herein. In at least oneembodiment, the first PE device includes a module configured to performembodiments of the method as described herein.

In at least one embodiment, a first PE device is provided, and the firstPE device includes a controller and a first forwarding child device. Thefirst forwarding child device includes an interface board, and mayfurther include a switching board. In at least one embodiment, the firstforwarding child device is configured to perform functions of theinterface board, and may further perform functions of the switchingboard. The controller includes a receiver, a processor, a transmitter, arandom access memory, a read-only memory, and a bus. The processor isseparately coupled to the receiver, the transmitter, the random accessmemory, and the read-only memory by using the bus. When the controllerneeds to be run, a basic input/output system or a bootloader in anembedded system that is built into the read-only memory is used to leada system to start, and lead the controller to enter a normal runningstate. In at least one embodiment, after entering the normal runningstate, the controller runs an application program and an operatingsystem in the random access memory, so that the processor performsfunctions of the main control board.

In at least one embodiment, an EVPN-VPWS network system is provided. TheEVPN-VPWS network system includes a first PE device as described herein.

In at least one embodiment, a computer storage medium is provided, andis configured to store a program, code, or an instruction used by thefirst PE device, and when a processor or a hardware device executes theprogram, the code, or the instruction, a function or an operation of thefirst PE device as described herein may be completed.

The embodiments of the application provide the packet processing method,the device, and the system by using the foregoing solutions. In theEVPN-VPWS network scenario, when the first PE device perceives that theAC side link connected to the first PE device is faulty, the first PEdevice may forward the received first VXLAN packet from the third PEdevice through the established third P2P VXLAN tunnel. After receivingthe first VXLAN packet, the second PE device sends the first VXLANpacket to the first CE device. Therefore, transient traffic bypassing isimplemented, which helps to reduce a packet loss of data traffic in atransmission process.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic structural diagram of an EVPN-VPWS networkaccording to an embodiment of the application;

FIG. 2 is a schematic structural diagram of another EVPN-VPWS networkaccording to an embodiment of the application;

FIG. 3 is a flowchart of a packet processing method according to anembodiment of the application;

FIG. 4 is a flowchart of another packet processing method according toan embodiment of the application;

FIG. 5 is a schematic structural diagram of a first PE device accordingto an embodiment of the application;

FIG. 6 is a schematic structural diagram of hardware of a first PEdevice according to an embodiment of the application;

FIG. 7 is a schematic structural diagram of hardware of another first PEdevice according to an embodiment of the application; and

FIG. 8 is a schematic structural diagram of hardware of still anotherfirst PE device according to an embodiment of the application.

DESCRIPTION OF EMBODIMENTS

The following separately provides detailed descriptions by usingspecific embodiments.

In embodiments of the application, UP indicates that a port is enabledor available. In at least one embodiment, the port is allowed to sendand receive a data packet. DOWN indicates that a port is disabled orunavailable. In at least one embodiment, the port is not allowed to sendand receive a data packet.

FIG. 1 is a schematic structural diagram of an EVPN-VPWS networkaccording to an embodiment of the application. As shown in FIG. 1, theEVPN-VPWS network includes a first PE device, a second PE device, and athird PE device. A first point-to-point (P2P) virtual extensible localarea network (VXLAN) tunnel is established between the first PE deviceand the third PE device. A second P2P VXLAN tunnel is establishedbetween the second PE device and the third PE device. A P2P VXLAN tunnelis usually a two-way tunnel. The embodiments of the application describetraffic from the third PE device to the first PE device and the secondPE device. Therefore, for ease of description, the first P2P VXLANtunnel is a P2P VXLAN tunnel from the third PE device to the first PEdevice, and the second P2P VXLAN tunnel is a P2P VXLAN tunnel from thethird PE device to the second PE device.

In the EVPN-VPWS network, any two PE devices are a pair of bordergateway protocol (BGP) peers. The BGP peer may also be referred to as anEVPN peer. FIG. 1 is used as an example. The first PE device and thesecond PE device are a pair of BGP peers, the first PE device and thethird PE device are a pair of BGP peers, and the second PE device andthe third PE device are a pair of BGP peers. “A pair of BGP peers” maybe understood as that one device is a BGP peer of the other device. Forexample, that the first PE device and the second PE device are a pair ofBGP peers may be understood as that the first PE device is a BGP peer ofthe second PE device, or understood as that the second PE device is aBGP peer of the first PE device. The BGP peer may also be referred to asa BGP neighbor. Correspondingly, the EVPN peer may also be referred toas an EVPN neighbor. In the application, for ease of description, theBGP peer is used in all subsequent embodiments. The BGP peer isestablished by using an OPEN message specified in the BGP, and theestablished BGP peer is maintained by using a KEEPALIVE message. For anembodiment of the OPEN message and the KEEPALIVE message, refer torelated descriptions in Internet Engineering Task Force (IETF) requestfor comments (RFC) 2858 and IETF RFC1771. In addition, a route reflector(RR) may be deployed in two end devices that establish the BGP peers, sothat establishment of the BGP peers is completed by using the RR. In anembodiment of the application, a PE device may also be referred to as anetwork virtualization edge (NVE) device.

In the EVPN-VPWS network, the EVPN may support the VPWS in an IP/MPLSnetwork. PE devices in the EVPN-VPWS network all run a VPWS instance.The VPWS instances in the PE devices and AC side ports of the PE deviceshave a one-to-one mapping relationship. Data traffic may be forwardedfrom an Ethernet segment on a source AC side to an Ethernet segment on atarget AC side. An MPLS label is related to an Ethernet auto-discoveryper EVPN instance (Ethernet A-D per EVI) route, and the MPLS label isused to forward the data traffic to the target AC side by the PE device.Therefore, the PE device can finish forwarding the traffic withoutneeding to search a media access control (MAC) table. The EVI representsan EVPN instance. As shown in FIG. 1, the first PE device, the second PEdevice, and the third PE device all run a VPWS instance.

As shown in FIG. 1, a first customer edge (CE) device is dual-homed tothe first PE device and the second PE device. In at least oneembodiment, the first CE device separately communicates with the firstPE device and the second PE device. The first CE device communicateswith the first PE device through a first Ethernet link, and the first CEdevice communicates with the second PE device through a second Ethernetlink. The first Ethernet link and the second Ethernet link are referredto as an AC side of the EVPN-VPWS network. For ease of description, theAC side is referred to as a local AC side. Similarly, a second CE devicecommunicates with the third PE device. A link between the second CEdevice and the third PE device is also referred to as an AC side of theEVPN-VPWS network. For ease of description, the AC side is referred toas a remote AC side. Because the embodiment of the application describesa traffic forwarding process from the third PE device to the first PEdevice and the second PE device, the local AC side may also be referredto as the target AC side, and the remote AC side may also be referred toas the source AC side.

In the EVPN-VPWS network, the CE device and the PE device are connectedby using an Ethernet link. In addition, all Ethernet links connected toa same CE device form one Ethernet segment (ES). Taking FIG. 1 as anexample, the first CE device is dual-homed to the first PE device andthe second PE device through two Ethernet links (namely, the firstEthernet link and the second Ethernet link), and the first Ethernet linkand the second Ethernet link form one ES, which is indicated by an ES1in FIG. 1. An Ethernet segment identifier (ESI) is used to identify acorresponding ES. Taking FIG. 1 as an example, ESI values of the ES1 ofthe first Ethernet link and the ES1 of the second Ethernet link are asame value. The ESI value of the ES1 is a non-zero value. The ESIincludes a type field and an ESI value field, and the Type field is usedto indicate a generation manner of the ESI. Two commonly used generationmanners are Type 0 and Type 1, Type 0 indicates generation throughmanual configuration, and Type 1 indicates generation by using the LinkAggregation Control Protocol (LACP) that runs between a PE and a CE. Avalue of the ESI value field ranges from 0 to 0xFF, where “0x” indicateshexadecimal. For generation and configuration rules of the ES and theESI, refer to descriptions in Chapter 5 in IETF RFC 7432.

In the EVPN-VPWS network shown in FIG. 1, optionally, the first CEdevice is dual-homed to the first PE device and the second PE device inthe EVPN-VPWS network through an aggregated link multi-chassis trunk(MC-Trunk) link. The MC-Trunk link may also be referred to as anenhanced Trunk (E-trunk). In at least one embodiment, the MC-Trunk linkincludes two member aggregated link Ethernet-trunk (Eth-trunk) links.One Eth-Trunk link is located between the first CE device and the firstPE device, and the other Eth-Trunk link is located between the first CEdevice and the second PE device. On the MC-Trunk link, active/standbystates of the two member Eth-Trunk links may be configured. As shown inFIG. 1, the Eth-Trunk link between the first CE device and the first PEdevice is set as a primary link, or is referred to as a primaryEth-Trunk link; and the Eth-Trunk link between the first CE device andthe second PE device is set as a secondary link, or is referred to as asecondary Eth-Trunk link. The first PE device and the second PE devicedetermine, by running an MC-Trunk protocol to negotiate with each other,that a port of the first PE device for connecting to the first CE deviceis in an active state, and a port of the second PE device for connectingto the first CE device is in an inactive state.

In the EVPN-VPWS network shown in FIG. 1, the PE device may be a routeror a layer 3 switch. The CE device may be a router, a switch, or a host.The PE device and the CE device in an embodiment of the application maybe the PE device and the CE device defined in RFC 7432. When the CEdevice is a router or a switch, the CE device may be connected to one ormore hosts. The host may be a physical device or a virtual machine (VM).The EVPN-VPWS shown in FIG. 1 may be applied to a plurality ofscenarios. For example, the EVPN-VPWS is applied to a mobile bearernetwork, and a typical mobile bearer network is an Internet Protocolradio access network (IP RAN). In the mobile bearer network, the firstCE device and the second CE device may be base transceiver stations(BTS), the first CE device and the second CE device may be connected toa base station controller (BSC) or a radio network controller (RNC), thefirst PE device and the second PE device may be cell site gateways(CSG), and the third PE device may be a radio network controller sitegateway (RSG). For another example, the EVPN-VPWS is applied to a fixednetwork. In the fixed network, the first CE device and the second CEdevice may be user side sites, the first PE device and the second PEdevice may be digital subscriber line access multiplexers (DSLAM), andthe third PE device may be a broadband access server (BAS).

In at least one embodiment, the first P2P VXLAN tunnel and the secondP2P VXLAN tunnel may use a primary/secondary manner to transmit the datatraffic sent by the third PE device to the first CE device. The firstP2P VXLAN tunnel is a primary tunnel, and the second P2P VXLAN tunnel isa secondary tunnel. The third PE device sends the data traffic to thefirst PE device through the first P2P VXLAN tunnel and the firstEthernet link, and the second P2P VXLAN tunnel is in an idle state. Whena fault occurs on the first Ethernet link, the active/standby states ofthe first P2P VXLAN tunnel and the second P2P VXLAN tunnel are switched.In a stable state, the third PE device sends the data traffic to thesecond PE device through the second P2P VXLAN tunnel and the secondEthernet link.

In at least one embodiment, the first P2P VXLAN tunnel and the secondP2P VXLAN tunnel may use a traffic balancing manner to transmit the datatraffic sent by the third PE device to the first CE device. The firstP2P VXLAN tunnel and the second P2P VXLAN tunnel are both in an activestate. The third PE device sends the data traffic to the first PE deviceand the second PE device by using a Hash algorithm in the trafficbalancing manner through a first path formed by the first P2P VXLANtunnel and the first Ethernet link and a second path formed by thesecond P2P VXLAN tunnel and the second Ethernet link. When a faultoccurs on the first Ethernet link, the first P2P VXLAN tunnel isswitched to an inactive state. In a stable state, the third PE devicesends the data traffic to the second PE device through the second path.

That the first P2P VXLAN tunnel and the second P2P VXLAN tunnel use aprimary/secondary manner to transmit the data traffic sent by the thirdPE device to the first CE device is used as an example to describe acase of the data traffic after a fault occurs on the first Ethernetlink. As shown in FIG. 1, the first PE device perceives that a faultoccurs on the first Ethernet link, and the first PE device and thesecond PE device perform primary/secondary switching based on theMC-Trunk protocol. The first PE device is switched to a secondarydevice, and the second PE device is switched to a primary device. Thefirst PE device and the second PE device send an EVPN route to the thirdPE device, and notify the third PE device that the first PE device andthe second PE device have performed primary/secondary switching. Afterreceiving the EVPN route sent by the first PE device and/or the secondPE device, the third PE device performs primary/secondary switching ofthe first P2P VXLAN tunnel and the second P2P VXLAN tunnel, so that thefirst P2P VXLAN tunnel is switched to a secondary tunnel, and the secondP2P VXLAN tunnel is switched to a primary tunnel. Therefore, after theprimary tunnel and the secondary tunnel are switched, the data trafficsent by the third PE device to the first CE device may be transmittedthrough the second P2P VXLAN tunnel, as shown by steady traffic in FIG.1 (solid line arrow). However, a fault perceiving process and an EVPNroute notification process are relatively long. Therefore, beforeprimary/secondary switching of the first P2P VXLAN tunnel and the secondP2P VXLAN tunnel is completed, the third PE device still sends the datatraffic to the first PE device through the first P2P VXLAN tunnel, asshown by transient traffic in FIG. 1 (dashed line arrow). Because thefirst Ethernet link is faulty, the transient traffic cannot reach thefirst CE device, which causes a packet loss of the data traffic. TheEVPN route includes an Ethernet auto-discovery per EVPN instance(Ethernet A-D per EVI) route. In combination with the foregoingdescriptions, in a scenario in which the first P2P VXLAN tunnel and thesecond P2P VXLAN tunnel use the primary/secondary manner to transmit thedata traffic sent by the third PE device to the first CE device, thesteady traffic is traffic sent to the first CE device through theprimary tunnel after the third PE device finishes performingprimary/secondary switching of the first P2P VXLAN tunnel and the secondP2P VXLAN tunnel, or traffic sent to the first CE device through theprimary tunnel before the first Ethernet link is faulty; and thetransient traffic is traffic sent to the first CE device through theprimary tunnel after the first Ethernet link is faulty and before thethird PE device finishes performing primary/secondary switching of thefirst P2P VXLAN tunnel and the second P2P VXLAN tunnel.

Similarly, when the first P2P VXLAN tunnel and the second P2P VXLANtunnel use the traffic balancing manner to transmit the data trafficsent by the third PE device to the first CE device, before entering astable state, the transient traffic transmitted by the first P2P VXLANtunnel also has a packet loss. In a scenario in which the first P2PVXLAN tunnel and the second P2P VXLAN tunnel use the traffic balancingmanner to transmit the data traffic sent by the third PE device to thefirst CE device, the steady traffic is traffic sent to the first CEdevice through the second P2P VXLAN tunnel after the first Ethernet linkis faulty, or traffic sent to the first CE device through the first P2PVXLAN tunnel and the second P2P VXLAN tunnel before the first Ethernetlink is faulty; and the transient traffic is traffic sent to the firstCE device through the first P2P VXLAN tunnel after the first Ethernetlink is faulty.

FIG. 2 is a schematic structural diagram of another EVPN-VPWS networkaccording to an embodiment of the application. Compared with theEVPN-VPWS network shown in FIG. 1, a third P2P VXLAN tunnel is deployedin the EVPN-VPWS network shown in FIG. 2. The third P2P VXLAN tunnel isestablished by the first PE device, and is a P2P VXLAN tunnel from thefirst PE device to the second PE device.

In FIG. 2, that the first P2P VXLAN tunnel and the second P2P VXLANtunnel use the primary/secondary manner to transmit the data trafficsent by the third PE device to the first CE device is used as an exampleto describe a case of the data traffic after the first Ethernet linkbetween the first CE device and the first PE device is faulty. As shownin FIG. 2, the first PE device perceives that a fault occurs on thefirst Ethernet link, and the first PE device and the second PE deviceperform primary/secondary switching based on the MC-Trunk protocol. Thefirst PE device is switched to a secondary device, and the second PEdevice is switched to a primary device. The first PE device and thesecond PE device send an EVPN route to the third PE device, and notifythe third PE device that the first PE device and the second PE devicehave performed primary/secondary switching. After receiving the EVPNroute sent by the first PE device or the second PE device, the third PEdevice performs primary/secondary switching of the first P2P VXLANtunnel and the second P2P VXLAN tunnel, so that the first P2P VXLANtunnel is switched to a secondary tunnel, and the second P2P VXLANtunnel is switched to a primary tunnel. Therefore, after the primarytunnel and the secondary tunnel are switched, the data traffic sent bythe third PE device to the first CE device may be transmitted throughthe second P2P VXLAN tunnel, as shown by steady traffic in FIG. 2 (solidline arrow). After transient traffic (dashed line arrow) in FIG. 2reaches the first PE device, the first PE device forwards the transienttraffic to the second PE device through the third P2P VXLAN tunnel, sothat the transient traffic can be sent to the first CE device via thesecond PE device. For a process in which the first PE device establishesthe third P2P VXLAN tunnel and a process in which the first PE deviceforwards the transient traffic through the third P2P VXLAN tunnel, referto descriptions in subsequent embodiments.

In at least one embodiment, in an EVPN-VPWS network scenario, when a PEdevice perceives that an AC side link connected to the PE device isfaulty, the PE device may forward received data traffic from a remote PEdevice through an established P2P VXLAN tunnel, so that data trafficbypassing is implemented, which helps to reduce a packet loss of thedata traffic in a transmission process. It should be understood thatFIG. 2 exemplarily shows an EVPN-VPWS network including three PEdevices, and in an actual scenario, a quantity of the PE devices may bemore than three. For example, the EVPN-VPWS network includes a pluralityof third PE devices. One of the third PE devices is a primary device,and all the other third PE devices are secondary devices.

FIG. 3 is a flowchart of a packet processing method according to anembodiment of the application. The method shown in FIG. 3 may be appliedto the EVPN-VPWS network shown in FIG. 2. The EVPN-VPWS network includesa first PE device, a second PE device, and a third PE device. The methodshown in FIG. 3 includes S101 to S105.

S101. The first PE device establishes a third P2P VXLAN tunnel from thefirst PE device to the second PE device.

As shown in FIG. 2, a first P2P VXLAN tunnel is deployed between thefirst PE device and the third PE device, and a second P2P VXLAN tunnelis deployed between the second PE device and the third PE device. Thefirst PE device may establish the third P2P VXLAN tunnel from the firstPE device to the second PE device. The third P2P VXLAN tunnel may beestablished based on a physical link between the first PE device and thesecond PE device. For example, a physical link that can transmit a layer3 service is deployed between the first PE device and the second PEdevice. The first PE device may receive, through the physical link, afirst EVPN route sent by the second PE device. The first PE devicereceives the first EVPN route, and based on the first EVPN route,establishes the third P2P VXLAN tunnel from the first PE device to thesecond PE device on the physical link. When the first PE devicedetermines that there is a fault on a first Ethernet link, the third P2PVXLAN tunnel is used to forward data traffic to the second PE device.The first Ethernet link is a link between the first PE device and afirst CE device. Similarly, the second PE device may also receive,through the physical link, a second EVPN route sent by the first PEdevice, so that the second PE device establishes, based on the secondEVPN route, a fourth P2P VXLAN tunnel from the second PE device to thefirst PE device on the physical link. When the second PE devicedetermines that there is a fault on a second Ethernet link, the fourthP2P VXLAN tunnel is used to forward data traffic to the first PE device.The second Ethernet link is a link between the second PE device and thefirst CE device.

In the method shown in FIG. 3, S101 should be understood as an optionaloperation. For example, in a process of constructing the EVPN-VPWSnetwork, the third P2P VXLAN tunnel already exists. In this case, themethod shown in FIG. 3 may not include S101. For another example, whenthe method shown in FIG. 3 is performed for the first time, byperforming S101, the first PE device establishes the third P2P VXLANtunnel from the first PE device to the second PE device. Subsequently,when the method shown in FIG. 3 is performed again, because the thirdP2P VXLAN tunnel has been established, S101 does not need to beperformed again.

Each of the first EVPN route and the second EVPN route includes anEthernet A-D per EVI route. For a process in which the first PE deviceestablishes, based on the Ethernet A-D per EVI route, the third P2PVXLAN tunnel and a process in which the second PE device establishes,based on the Ethernet A-D per EVI route, the fourth P2P VXLAN tunnel,refer to descriptions in subsequent embodiments of the application.

S102. The first PE device receives a first VXLAN packet through a firstP2P VXLAN tunnel between the first PE device and the third PE device,where the first VXLAN packet is a VXLAN packet sent by the third PEdevice to the first CE device via the first P2P VXLAN tunnel, the firstPE device, and the first Ethernet link, the first CE device isdual-homed to the first PE device and the second PE device respectivelythrough the first Ethernet link and the second Ethernet link, and thefirst Ethernet link and the second Ethernet link form an Ethernetsegment ES.

As shown in FIG. 2, a second CE device may send data traffic to thefirst CE device. After receiving the data traffic from the second CEdevice, the third PE device encapsulates the data traffic as the firstVXLAN packet. Then, the third PE device may send the first VXLAN packetto the first CE device via the first P2P VXLAN tunnel, the first PEdevice, and the first Ethernet link. In a primary/secondary manner, thefirst P2P VXLAN tunnel is a primary tunnel, and the second P2P VXLANtunnel is a secondary tunnel. Normally, the first P2P VXLAN tunnel isused to forward the first VXLAN packet, while the second P2P VXLANtunnel is not used to forward the first VXLAN packet. In a trafficbalancing manner, the first P2P VXLAN tunnel and the second P2P VXLANtunnel are both in an active state. The third PE device forwards thefirst VXLAN packet through the first P2P VXLAN tunnel and the second P2PVXLAN tunnel based on a Hash algorithm.

As shown in FIG. 2, the first CE device is dual-homed to the first PEdevice and the second PE device through two Ethernet links, and the twoEthernet links form one ES, indicated by an ES 1 in FIG. 2. Forexplanations of the ES, refer to the forgoing descriptions. Details arenot described herein again.

S103. The first PE device forwards the first VXLAN packet to the secondPE device through the third P2P VXLAN tunnel from the first PE device tothe second PE device when the first PE device determines that there is afault on the first Ethernet link, where the first Ethernet linkconnected to the first PE device and a link formed by the third P2PVXLAN tunnel and the second Ethernet link have a primary/secondaryrelationship.

A link detection packet is deployed on the first Ethernet link. Forexample, the first CE device periodically sends the link detectionpacket to the first PE device through the first Ethernet link. When thefirst PE device determines that the link detection packet sent by thefirst CE device is not received within preset duration, the first PEdevice may determine that there is a fault on the first Ethernet link.The link detection packet includes a bidirectional forwarding detection(BFD) packet.

After determining that there is a fault on the first Ethernet link, thefirst PE device stops forwarding the first VXLAN packet to the first CEdevice through the first Ethernet link. Then, the first PE deviceforwards the first VXLAN packet to the second PE device through thethird P2P VXLAN tunnel. Therefore, the third P2P VXLAN tunnel is used toimplement bypassing of the first VXLAN packet sent by the third PEdevice to the first CE device via the first P2P VXLAN tunnel, the firstPE device, and the first Ethernet link.

For example, the first Ethernet link connected to the first PE deviceand the link formed by the third P2P VXLAN tunnel and the secondEthernet link have a primary/secondary relationship. Normally, the firstEthernet link connected to the first PE device is in an active state,that is, a first port is in an UP state; and the link formed by thethird P2P VXLAN tunnel and the second Ethernet link is in a standbystate, that is, a second port of the first PE device for connecting tothe third P2P VXLAN tunnel is in a DOWN state. Therefore, normally, thefirst VXLAN packet forwarded by the first P2P VXLAN tunnel may reach thefirst CE device through the first Ethernet link. When the first PEdevice determines that there is a fault on the first Ethernet link,primary/secondary switching occurs between the link formed by the thirdP2P VXLAN tunnel and the second Ethernet link, and the first Ethernetlink. The first port is switched to a DOWN state, and the second port isswitched to an UP state. In at least one embodiment, the first PE deviceblocks the first port, and enables the second port. Therefore, after thefirst VXLAN packet forwarded by the first P2P VXLAN tunnel reaches thefirst PE device, the first PE device forwards the first VXLAN packet tothe second PE device through the third P2P VXLAN tunnel. In addition,because a port of the second PE device for connecting to the secondEthernet link is in an UP state, the first VXLAN packet may reach thefirst CE device through the second Ethernet link.

For example, when the first PE device determines that the first Ethernetlink is recovered from the fault, primary/secondary switching occursbetween the link formed by the third P2P VXLAN tunnel and the secondEthernet link, and the first Ethernet link. The first port is switchedto an UP state, and the second port is switched to a DOWN state. In atleast one embodiment, the first PE device enables the first port andblocks the second port. Therefore, the first PE device receives a secondVXLAN packet from the third PE device through the first P2P VXLANtunnel, and forwards the second VXLAN packet to the first CE devicethrough the first Ethernet link.

Similarly, the second Ethernet link connected to the second PE deviceand a link formed by the fourth P2P VXLAN tunnel and the first Ethernetlink have a primary/secondary relationship. The fourth P2P VXLAN tunnelis a P2P VXLAN tunnel from the second PE device to the first PE device.

S104. The second PE device receives the first VXLAN packet through thethird P2P VXLAN tunnel.

S105. The second PE device forwards the first VXLAN packet to the firstCE device through the second Ethernet link.

When the first PE device determines that there is a fault on the firstEthernet link, the first PE device forwards the first VXLAN packet tothe second PE device through the third P2P VXLAN tunnel. The second PEdevice receives the first VXLAN packet. Then, the second PE deviceforwards the first VXLAN packet to the first CE device through thesecond Ethernet link.

In at least one embodiment, in an EVPN-VPWS network scenario, when thefirst PE device perceives that an AC side link connected to the first PEdevice is faulty, the first PE device may forward the received firstVXLAN packet from the third PE device through the established third P2PVXLAN tunnel. After receiving the first VXLAN packet, the second PEdevice sends the first VXLAN packet to the first CE device. Therefore,transient traffic bypassing is implemented, which helps to reduce apacket loss of data traffic in a transmission process. It should beunderstood that the second PE device may also establish the fourth P2PVXLAN tunnel from the second PE device to the first PE device.Therefore, when the second PE device determines that there is a fault onthe second Ethernet link, the second PE device forwards the data trafficto the first PE device through the fourth P2P VXLAN tunnel based on themethod in the foregoing embodiment.

In at least one embodiment, the first PE device may implementestablishment of the third P2P VXLAN tunnel based on an EVPN route. Inat least one embodiment, the first PE device may implement theestablishment of the third P2P VXLAN tunnel based on an Ethernet A-D perEVI route. The following uses FIG. 4 as an example to describe a processin which the first PE device establishes the third P2P VXLAN tunnel.

S1011. The second PE device sends a first Ethernet A-D per EVI route tothe first PE device, where the first Ethernet A-D per EVI route includesan ESI and an Ethernet tag identifier (Ethernet tag ID), the ESI is usedto indicate an ES between the first CE device and the second PE device,and the Ethernet Tag ID includes a local VPWS instance identifier and aremote VPWS instance identifier of the second PE device.

S1012. The first PE device receives the first Ethernet A-D per EVI routesent by the second PE device.

In the EVPN-VPWS network scenario, the first PE device and the second PEdevice may establish a P2P VXLAN tunnel in an automatic configurationmanner. In addition, a process of establishing the third P2P VXLANtunnel may be completed at an initialization stage of the EVPN-VPWSnetwork. In at least one embodiment, the second PE device sends thefirst Ethernet A-D per EVI route to the first PE device, and the firstPE device receives the first Ethernet A-D per EVI route.

The PE device in the EVPN-VPWS network may run a VPWS instance.Therefore, a VPWS instance identifier is configured on all PE devices inthe EVPN-VPWS network. Taking FIG. 2 as an example, a local VPWSinstance identifier and a remote VPWS instance identifier are configuredon all of the first PE device, the second PE device, and the third PEdevice. The local VPWS instance identifier stored on the first PE deviceis used to indicate a VPWS instance run by the first PE device, and thelocal VPWS instance identifier stored on the second PE device is used toindicate a VPWS instance run by the second PE device. Because the firstPE device and the second PE device are connected to the first CE deviceby using a same ES, the local VPWS instance run by the first PE deviceand the local VPWS instance run by the second PE device are the same,and the local VPWS instance identifier stored on the first PE device andthe local VPWS instance identifier stored on the second PE device arethe same, such as VPWS_11. The remote VPWS instance identifier (forexample, VPWS_22) stored on the first PE device and the remote VPWSinstance identifier stored on the second PE device are used to indicatea VPWS instance run by the third PE device. Correspondingly, the localVPWS instance identifier stored on the third PE device is used toindicate the VPWS instance run by the third PE device, and the remoteVPWS instance identifier stored on the third PE device is used toindicate the VPWS instance run by the first PE device and the second PEdevice. For example, the local VPWS instance identifier stored on thethird PE device is VPWS_22, and the remote VPWS instance identifierstored on the third PE device is VPWS_11. In this way, the first PEdevice, the second PE device, and the third PE device may implement theVPWS in the EVPN network.

The first Ethernet A-D per EVI route includes an ESI and an Ethernet TagID. Based on explanations in the foregoing description, the ESI is usedto indicate an ES between the first CE device and the second PE device.The Ethernet Tag ID is used to carry the local VPWS instance identifierand the remote VPWS instance identifier of the second PE device. Thefirst Ethernet A-D per EVI route may further include another type offield. For details, refer to a corresponding explanation in IETF RFC7432.

S1013. When the first PE device determines that the ESI in the firstEthernet A-D per EVI route is the same as an ESI stored on the first PEdevice, that the local VPWS instance identifier of the second PE devicein the first Ethernet A-D per EVI route is the same as a local VPWSinstance identifier of the first PE device, and that the remote VPWSinstance identifier of the second PE device in the first Ethernet A-Dper EVI route is the same as a remote VPWS instance identifier of thefirst PE device, the first PE device establishes the third P2P VXLANtunnel from the first PE device to the second PE device.

After receiving the first Ethernet A-D per EVI route, the first PEdevice decapsulates the first Ethernet A-D per EVI route, and extractsthe ESI, the local VPWS instance identifier of the second PE device, andthe remote VPWS instance identifier of the second PE device in the firstEthernet A-D per EVI route. Then, the first PE device compares the aboveinformation in the first Ethernet A-D per EVI route with the ESI, thelocal VPWS instance identifier, and the remote VPWS instance identifierthat are stored on the first PE device.

If a comparison result shows that the above information in the firstEthernet A-D per EVI route is the same as the ESI, the local VPWSinstance identifier, and the remote VPWS instance identifier that arestored on the first PE device, the first PE device may determine thatthe first PE device and the second PE device have ports connected to asame ES, are configured with a same local VPWS instance, and may bothobtain VPWS traffic from the third PE device. The first PE deviceestablishes the third P2P VXLAN tunnel from the first PE device to thesecond PE device. The first Ethernet link connected to the first PEdevice and the link formed by the third P2P VXLAN tunnel and the secondEthernet link have a primary/secondary relationship.

Based on the foregoing process from S1011 to S1013, the first PE devicemay automatically establish the third P2P VXLAN tunnel from the first PEdevice to the second PE device. Similarly, the second PE device may alsoautomatically establish the fourth P2P VXLAN tunnel from the second PEdevice to the first PE device.

In at least one embodiment, optionally, the first CE device may bedual-homed to the first PE device and the second PE device in theEVPN-VPWS network through an MC-Trunk link. That the first P2P VXLANtunnel and the second P2P VXLAN tunnel run in a primary/secondary manneris used as an example in the following to describe an embodiment inwhich the first PE device processes data traffic sent by the third PEdevice to the first CE device when the first PE device determines thatthere is a fault on the first Ethernet link.

As shown in FIG. 2, the first Ethernet link and the second Ethernet linkare MC-Trunk links, the first Ethernet link is a primary link, thesecond Ethernet link is a secondary link, the first PE device is aprimary device, the second PE device is a secondary device, and when thefirst PE device determines that there is a fault on the first Ethernetlink, the method further includes the following operations.

S2011. The first PE device sends a first MC-Trunk packet to the secondPE device, where the first MC-Trunk packet is used to notify the secondPE device that the first Ethernet link is faulty.

The first CE device may be dual-homed to the first PE device and thesecond PE device through the MC-Trunk link. In addition, active/standbystates of two Ethernet links are configured on the MC-Trunk link. Whenthere is a fault on the first Ethernet link, the first PE device mayperceive the fault by using a link detection packet (for example, theBFD packet mentioned in the foregoing description). The first PE devicetriggers primary/secondary switching of the MC-Trunk link, switches thefirst Ethernet link to a secondary link, and sends the first MC-Trunkpacket to the second PE device. The first MC-Trunk packet is used tonotify the second PE device that the first Ethernet link is faulty. Thesecond PE device receives the first MC-Trunk packet, and based on thefirst MC-Trunk packet, determines that the first Ethernet link isfaulty. After determining that the first Ethernet link is faulty, thesecond PE device switches the second Ethernet link to a primary link.Therefore, when the first Ethernet link is faulty, the first PE deviceand the second PE device complete primary/secondary switching on theMC-Trunk.

S2012. The first PE device sends a second Ethernet A-D per EVI route tothe third PE device. The second Ethernet A-D per EVI route carries a Pidentifier and a B identifier. The P identifier is not set and the Bidentifier is set, which is used to indicate that the first PE device isswitched from a primary device to a secondary device.

After perceiving that the first Ethernet link is faulty and switchingthe first Ethernet link to a secondary link, the first PE device sendsthe second Ethernet A-D per EVI route to the third PE device. In atleast one embodiment, an Ethernet Tag ID in the second Ethernet A-D perEVI route carries the local VPWS instance identifier and the remote VPWSinstance identifier of the first PE device. The second Ethernet A-D perEVI route further carries the P identifier and the B identifier. The Pidentifier is set to 1, which is used to indicate that a PE devicereleasing the P identifier is a primary device, and the B identifier isset to 1, which is used to indicate that a PE device releasing the Bidentifier is a secondary device. For example, in a multihomingsingle-active scenario, the first PE device sends a second Ethernet A-Dper EVI route in which P=1 (indicating: set) and B=0 (indicating: notset) to indicate that the first PE device is a primary device; and thefirst PE device sends a second Ethernet A-D per EVI route in which P=0(indicating: not set) and B=1 (indicating: set) to indicate that thefirst PE device is a secondary device. Therefore, after perceiving thatthe first Ethernet link is faulty and switching the first Ethernet linkto a secondary link, the first PE device sends the second Ethernet A-Dper EVI route carrying P=0 and B=1 to the third PE device, so that thefirst PE device requests the third PE device to switch the first PEdevice from a primary device to a secondary device. After receiving thesecond Ethernet A-D per EVI route, the third PE device triggersprimary/secondary switching of the first PE device and the second PEdevice.

Based on the description in S2011, after receiving the first MC-Trunkpacket, and based on the first MC-Trunk packet, determining that thefirst Ethernet link is faulty, the second PE device switches the secondEthernet link to a primary link. Therefore, the second PE device sendsan Ethernet A-D per EVI route that carries P=1 and B=0 to the third PEdevice to indicate that the second PE device requests the third PEdevice to switch the second PE device from a secondary device to aprimary device. After receiving any Ethernet A-D per EVI route from thefirst PE device and the second PE device, the third PE device triggersprimary/secondary switching of the first PE device and the second PEdevice.

Optionally, the second Ethernet A-D per EVI route carries EVPN layer 2attributes extended community. The EVPN layer 2 attributes extendedcommunity includes control flags, and the control flags are used tocarry a P identifier and a B identifier. The control flags may furtherinclude a C identifier. The C identifier is set to 1 to indicate that anEVPN packet sent to the first PE device needs to carry a control word.

By using S2011 and 2012, the first P2P VXLAN tunnel and the second P2PVXLAN tunnel may complete primary/secondary switching. In aprimary/secondary switching process, the third P2P VXLAN tunnel is usedto implement transient traffic bypassing, which helps to reduce a packetloss of the data traffic in a transmission process.

Optionally, when the first P2P VXLAN tunnel and the second P2P VXLANtunnel run in a primary/secondary manner, and the first PE devicedetermines that the first Ethernet link is recovered from the fault, themethod further includes:

S3011. The first PE device sends a third Ethernet A-D per EVI route tothe third PE device. The third Ethernet A-D per EVI route carries a Pidentifier and a B identifier. The P identifier is set and the Bidentifier is not set, which is used to indicate that the first PEdevice is switched from a secondary device to a primary device.

By using the process in S2011 and S2012, after entering a stable state,the data traffic sent by the third PE device to the first CE device isforwarded through the second P2P VXLAN tunnel. In at least oneembodiment, the second P2P VXLAN tunnel is a primary tunnel, and thefirst P2P VXLAN tunnel is a secondary tunnel. Further, when the first PEdevice detects that a link detection packet between the first PE deviceand the first CE device is recovered, for example, when the first PEdevice receives the BFD packet from the first CE device again, the firstPE device may determine that the fault of the first Ethernet link isremoved. The first PE device sends the third Ethernet A-D per EVI routeto the third PE device. The third Ethernet A-D per EVI route carries P=1and B=0 identifiers, indicating that the first PE device is switchedfrom a secondary device to a primary device. After receiving the thirdEthernet A-D per EVI route, the third PE device triggersprimary/secondary switching of the first PE device and the second PEdevice, to switch the first PE device to a primary device and switch thesecond PE device to a secondary device. In at least one embodiment, thefirst PE device further sends an MC-Trunk packet to the second PE deviceto notify the second PE device that the fault of the first Ethernet linkis removed.

S3012. The first PE device receives a third VXLAN packet through afourth P2P VXLAN tunnel. The third VXLAN packet is a VXLAN packet sentby the third PE device to the CE device via the second P2P VXLAN tunnel,the second PE device, and the second Ethernet link. The fourth P2P VXLANtunnel is a P2P VXLAN tunnel from the second PE device to the first PEdevice.

S3013. The first PE device forwards the third VXLAN packet to the firstCE device through the first Ethernet link.

In at least one embodiment, in a process in which the first PE deviceand the second PE device perceive that the fault of the first Ethernetlink is removed and a primary/secondary switching process of the firstP2P VXLAN tunnel and the second P2P VXLAN tunnel, the second P2P VXLANtunnel may alternatively have transient traffic, which is indicated bythe third VXLAN packet. In at least one embodiment, the second PE devicemay forward the third VXLAN packet to the first PE device through thefourth P2P VXLAN tunnel. The first PE device receives the third VXLANpacket, and forwards the third VXLAN packet to the first CE devicethrough the first Ethernet link. The fourth P2P VXLAN tunnel is a P2PVXLAN tunnel from the second PE device to the first PE device.

The process from S3011 to S3013 implements transient traffic bypassingin a fault removal process, which helps to reduce a packet loss of thedata traffic in a transmission process.

Optionally, the first P2P VXLAN tunnel and the second P2P VXLAN tunnelmay use a traffic balancing manner to transmit the data traffic sent bythe third PE device to the first CE device. In the traffic balancingmanner, the first Ethernet link and the second Ethernet link are bothprimary links. The first PE device and the second PE device areconfigured to receive traffic from the third PE device in the trafficbalancing manner.

In at least one embodiment, when the first PE device determines that thefirst Ethernet link is faulty, the data traffic sent by the third PEdevice based on the Hash algorithm through the first P2P VXLAN tunnel istransmitted to the second PE device through the third P2P VXLAN tunnel.

Further, optionally, the first PE device sends an Ethernetauto-discovery per Ethernet segment (Ethernet A-D per ES) withdrawalroute to the third PE device through the first P2P VXLAN tunnel. Afterreceiving the Ethernet A-D per ES withdrawal route, the third PE devicedeletes a route of the first PE device. After deleting the route of thefirst PE device, the third PE device no longer sends the data trafficbased on the Hash algorithm through the first P2P VXLAN tunnel, andinstead, sends the data traffic through the second P2P VXLAN tunnel.Therefore, bypassing of transient traffic generated in a process inwhich the first PE device generates and sends the Ethernet A-D per ESwithdrawal route, and the third PE device processes the Ethernet A-D perES withdrawal route may be implemented by using the third P2P VXLANtunnel, which helps to reduce a packet loss of the data traffic in atransmission process.

FIG. 5 is a schematic structural diagram of a first PE device 1000according to an embodiment of the application. The first PE device 1000shown in FIG. 5 may perform corresponding operations performed by thefirst PE device in the method of the foregoing embodiment. The first PEdevice is deployed in an EVPN-VPWS network, and the EVPN-VPWS networkfurther includes a second PE device and a third PE device. As shown inFIG. 5, the first PE device 1000 includes a receiving unit 1002, aprocessing unit 1004, and a sending unit 1006.

The receiving unit 1002 is configured to receive a first VXLAN packetthrough a first P2P VXLAN tunnel between the first PE device and thethird PE device, where the first VXLAN packet is a VXLAN packet sent bythe third PE device to a CE device via the first P2P VXLAN tunnel, thefirst PE device, and a first Ethernet link, the CE device is dual-homedto the first PE device and the second PE device respectively through thefirst Ethernet link and a second Ethernet link, and the first Ethernetlink and the second Ethernet link form an ES;

the processing unit 1004 is configured to determine that there is afault on the first Ethernet link; and

the sending unit 1006 is configured to forward the first VXLAN packet tothe second PE device through a third P2P VXLAN tunnel from the first PEdevice to the second PE device, where the first Ethernet link connectedto the first PE device and a link formed by the third P2P VXLAN tunneland the second Ethernet link have a primary/secondary relationship.

Optionally, before the receiving unit 1002 receives the first VXLANpacket through the first P2P VXLAN tunnel, the receiving unit 1002 isfurther configured to receive a first Ethernet A-D per EVI route sent bythe second PE device. The first Ethernet A-D per EVI route includes anESI and an Ethernet Tag ID. The ESI is used to indicate an ES betweenthe CE device and the second PE device. The Ethernet Tag ID includes alocal VPWS instance identifier and a remote VPWS instance identifier ofthe second PE device. When the processing unit 1004 determines that theESI in the first Ethernet A-D per EVI route is the same as an ESI storedon the first PE device, that the local VPWS instance identifier of thesecond PE device in the first Ethernet A-D per EVI route is the same asa local VPWS instance identifier of the first PE device, and that theremote VPWS instance identifier of the second PE device in the firstEthernet A-D per EVI route is the same as a remote VPWS instanceidentifier of the first PE device, the processing unit 1004 is furtherconfigured to establish the third P2P VXLAN tunnel from the first PEdevice to the second PE device.

Optionally, that the processing unit 1004 determines that there is afault on the first Ethernet link includes: when the processing unit 1004determines that there is a fault on the first Ethernet link, theprocessing unit 1004 is further configured to block a port of the firstPE device for connecting to the first Ethernet link, and enable a portof the first PE device for connecting to the third P2P VXLAN tunnel.

Optionally, when the processing unit 1004 determines that the firstEthernet link is recovered from the fault, the processing unit 1004 isfurther configured to enable the port of the first PE device forconnecting to the first Ethernet link, and block the port of the firstPE device for connecting to the third P2P VXLAN tunnel; the receivingunit 1002 is further configured to receive a second VXLAN packet fromthe third PE device; and the sending unit 1006 is further configured toforward the second VXLAN packet to the CE device through the firstEthernet link.

Optionally, the first Ethernet link and the second Ethernet link areMC-Trunk links. The first Ethernet link is a primary link, the secondEthernet link is a secondary link, the first PE device is a primarydevice, and the second PE device is a secondary device. When theprocessing unit 1004 determines that there is a fault on the firstEthernet link, the sending unit 1006 is further configured to send afirst MC-Trunk packet to the second PE device, where the first MC-Trunkpacket is used to notify the second PE device that the first Ethernetlink is faulty. The sending unit 1006 is further configured to send asecond Ethernet A-D per EVI route to the third PE device, where thesecond Ethernet A-D per EVI route carries a P identifier and a Bidentifier, and the P identifier is not set and the B identifier is set,which is used to indicate that the first PE device is switched from aprimary device to a secondary device.

Optionally, when the processing unit 1004 determines that the firstEthernet link is recovered from the fault, the sending unit 1006 isfurther configured to send a third Ethernet A-D per EVI route to thethird PE device, where the third Ethernet A-D per EVI route carries a Pidentifier and a B identifier, and the P identifier is set and the Bidentifier is not set, which is used to indicate that the first PEdevice is switched from a secondary device to a primary device. Thereceiving unit 1002 is further configured to receive a third VXLANpacket through a fourth P2P VXLAN tunnel, where the third VXLAN packetis a VXLAN packet sent by the third PE device to the CE device via thesecond P2P VXLAN tunnel, the second PE device, and the second Ethernetlink, and the fourth P2P VXLAN tunnel is a P2P VXLAN tunnel from thesecond PE device to the first PE device. The sending unit 1006 isfurther configured to forward the third VXLAN packet to the CE devicethrough the first Ethernet link.

Optionally, the first Ethernet link and the second Ethernet link areboth primary links, and the first PE device and the second PE device areconfigured to receive traffic from the third PE device in a trafficbalancing manner.

Optionally, the sending unit 1006 is further configured to send anEthernet auto-discovery per Ethernet segment Ethernet A-D per ESwithdrawal route to the third PE device through the first P2P VXLANtunnel.

The first PE device shown in FIG. 5 may perform corresponding operationsperformed by the first PE device in the method of the foregoingembodiment. When the first PE device is applied to an EVPN-VPWS networkscenario, transient traffic bypassing is implemented, which helps toreduce a packet loss of data traffic in a transmission process. Itshould be understood that the structure in FIG. 5 is also applicable tothe second PE device in FIG. 2.

FIG. 6 is a schematic structural diagram of hardware of a first PEdevice 1100 according to an embodiment of the application. The first PEdevice 1100 shown in FIG. 6 may perform corresponding operationsperformed by the first PE device in the method of the foregoingembodiment.

As shown in FIG. 6, the first PE device 1100 includes a processor 1101,a memory 1102, an interface 1103, and a bus 1104. The interface 1103 maybe implemented in a wireless or wired manner. In at least oneembodiment, the interface 1103 may be a network adapter. The processor1101, the memory 1102, and the interface 1103 are connected by using thebus 1104.

The interface 1103 may include a transmitter and a receiver, and isconfigured to send and receive information between the first PE deviceand the second PE device in the foregoing embodiment, or is configuredto send and receive information between the first PE device and thethird PE device in the foregoing embodiment. For example, the interface1103 is configured to receive a VXLAN packet from the third PE device,and forward the VXLAN packet to the second PE device. For example, theinterface 1103 is configured to support processes of S102 and S103 inFIG. 3. The processor 1101 is configured to perform processing performedby the first PE device in the foregoing embodiment. For example, theprocessor 1101 is configured to determine that there is a fault on afirst Ethernet link, and may be further configured to establish a thirdP2P VXLAN tunnel from the first PE device to the second PE device;and/or is applied to another process of the technology described in thespecification. For example, the processor 1101 is configured to supportprocesses of S101 and S103 in FIG. 3. The memory 1102 includes anoperating system 11021 and an application program 11022, and isconfigured to store a program, code, or an instruction. When executingthe program, the code, or the instruction, the processor or a hardwaredevice may complete a processing process related to the first PE devicein the method embodiment. Optionally, the memory 1102 may include aread-only memory (ROM) and a random access memory (RAM). The ROMincludes a basic input/output system (BIOS) or an embedded system, andthe RAM includes an application program and an operating system. Whenthe first PE device 1100 needs to be run, the BIOS or a bootloader inthe embedded system that is built into the ROM is used to lead a systemto start, and lead the first PE device 1100 to enter a normal runningstate. After entering the normal running state, the first PE device 1100runs the application program and the operating system in the RAM, so asto complete the processing process related to the first PE device in themethod embodiment.

It may be understood that FIG. 6 merely shows a simplified design of thefirst PE device 1100. In actual application, the first PE device mayinclude any quantity of interfaces, processors, or memories. Inaddition, only the first PE device is used as an example for descriptionin an embodiment. It should be understood that the second PE device ormore PE devices have same functions as the first PE device. Details arenot described herein again.

FIG. 7 is a schematic structural diagram of hardware of another first PEdevice 1200 according to an embodiment of the application. The first PEdevice 1200 shown in FIG. 7 may perform corresponding operationsperformed by the first PE device in the method of the foregoingembodiment.

As shown in FIG. 7, the first PE device 1200 includes a main controlboard 1210, an interface board 1230, a switching board 1220, and aninterface board 1240. The main control board 1210, the interface board1230, the interface board 1240, and the switching board 1220 areconnected to a platform backboard by using a system bus forinterworking. The main control board 1210 is configured to completefunctions such as system management, device maintenance, and protocolprocessing. The switching board 1220 is configured to complete dataexchange between interface boards (the interface board is also referredto as a line card or a service board). The interface board 1230 and theinterface board 1240 are configured to provide various serviceinterfaces (for example, a POS interface, a GE interface, and an ATMinterface), and forward a data packet.

The interface board 1230 may include a central processing unit 1231, aforwarding entry memory 1234, a physical interface card 1233, and anetwork processor 1232. The central processing unit 1231 is configuredto control and manage the interface board 1230, and communicate with acentral processing unit 1211 on the main control board 1210. Theforwarding entry memory 1234 is configured to store a forwarding entry.The physical interface card 1233 is configured to receive and sendtraffic. The network processor 1232 is configured to control thephysical interface card 1233 to send and receive the traffic based onthe forwarding entry.

In at least one embodiment, the physical interface card 1233 receives aVXLAN packet from a third PE device, and sends the VXLAN packet to thecentral processing unit 1211 on the main control board 1210 via thecentral processing unit 1231. The central processing unit 1211 isconfigured to obtain the VXLAN packet. The physical interface card 1233is further configured to forward the VXLAN packet to a second PE device.

The central processing unit 1211 is further configured to determine thatthere is a fault on a first Ethernet link. The central processing unit1211 is further configured to establish a third P2P VXLAN tunnel fromthe first PE device to the second PE device.

The central processing unit 1211 is further configured to process theVXLAN packet. The central processing unit 1211 sends the VXLAN packet tothe physical interface card 1233 via the central processing unit 1231.The physical interface card 1233 sends the VXLAN packet to the second PEdevice.

The central processing unit 1231 is further configured to control thenetwork processor 1232 to obtain the forwarding entry in the forwardingentry memory 1234. In addition, the central processing unit 1231 isfurther configured to control the network processor 1232 to receive andsend traffic through the physical interface card 1233.

As shown in FIG. 7, an interface board 1240 includes a centralprocessing unit 1241, a forwarding entry memory 1244, a physicalinterface card 1243 and a network processor 1242. It should beunderstood that an operation on the interface board 1240 is consistentwith an operation on the interface board 1230 in an embodiment of theinvention. For brevity, details are not described. It should beunderstood that the first PE device 1200 in an embodiment may correspondto functions and/or operations implemented in the foregoing methodembodiments. Details are not described herein again. In addition, onlythe first PE device is used as an example for description in anembodiment. It should be understood that the second PE device or more PEdevices have same functions as the first PE device. Details are notdescribed herein again.

In addition, it should be noted that there may be one or more maincontrol boards. When there are a plurality of main control boards, aprimary main control board and a secondary main control board may beincluded. There may be one or more interface boards, and the first PEdevice with a stronger data processing capability provides moreinterface boards. There may be one or more physical interface cards onthe interface board. There may be no switching board, or there may beone or more switching boards. When there are a plurality of switchingboards, load sharing and redundancy backup may be jointly implemented bythe plurality of switching boards. In a centralized forwardingarchitecture, the first PE device may not need a switching board, andthe interface board implements a service data processing function of theentire system. In a distributed forwarding architecture, the first PEdevice may have at least one switching board, and data exchange betweena plurality of interface boards is implemented by using the switchingboard, so as to provide a large-capacity data exchange and processingcapability. Therefore, a data access and processing capability of thefirst PE device in the distributed architecture is better than that of adevice in the centralized architecture. Use of a specific architecturedepends on a specific networking deployment scenario. This is notlimited herein.

FIG. 8 is a schematic structural diagram of hardware of still anotherfirst PE device 1300 according to an embodiment of the application. Thefirst PE device 1300 shown in FIG. 8 may perform correspondingoperations performed by the first PE device in the method of theforegoing embodiment.

Such a product form of the first PE device 1300 is applicable to anetwork architecture (for example, software-defined networking (SDN)) inwhich control and forwarding are separated. In the SDN, the main controlboard 1210 of the first PE device 1200 shown in FIG. 7 is separated fromthe device, and forms a new independent physical device (e.g., acontroller 1210A shown in FIG. 8), and remaining components form anotherindependent physical device (e.g., a first forwarding child device 1200Ashown in FIG. 8). The controller 1210A interacts with the firstforwarding child device 1200A by using a control channel protocol. Thecontrol channel protocol may be the OpenFlow protocol, the pathcomputation element communication protocol (PCEP), the BGP, theinterface to the routing system (I2RS), or the like. That is, comparedwith the embodiment corresponding to FIG. 7, the first PE device 1300 inan embodiment includes the controller 1210A and the first forwardingchild device 1200A that are separated from the first PE device 1200.

The controller 1210A may be implemented based on a general-purposephysical server or a dedicated hardware structure. In a design example,the controller includes a receiver, a processor, a transmitter, a RAM, aROM, and a bus (not shown in the figure). The processor is separatelycoupled to the receiver, the transmitter, the RAM, and the ROM by usingthe bus. When the controller needs to be run, a BIOS or a bootloader inan embedded system that is built into the ROM is used to lead a systemto start, and lead the controller to enter a normal running state. Afterentering a normal running state, the controller runs an applicationprogram and an operating system in the RAM, so that the processorperforms all functions and operations of the main control board 1210 inFIG. 7.

The first forwarding child device 1200A may be implemented based on adedicated hardware structure. The function and the structure of thefirst forwarding child device 1200A are consistent with those of theinterface board 1230, the interface board 1240, and the switching board1220 in FIG. 7, so as to perform a corresponding function and operation.Alternatively, the first forwarding child device 1200A may be a virtualfirst forwarding child device implemented based on a general-purposephysical server and a network functions virtualization (NFV) technology,and the virtual first forwarding child device is a virtual router. In ascenario of the virtual first forwarding child device, the interfaceboard, the switching board, and the processor that are included in thefirst forwarding child device in the foregoing embodiment of thephysical first forwarding child device can be considered as an interfaceresource, a network resource, and a processing resource that areallocated by the physical first forwarding child device to the virtualfirst forwarding child device by using a general-purpose physical serverin a virtual environment. For details of implementing functions oroperations of the first forwarding child device by using thegeneral-purpose physical server, or implementing functions or operationsof the first forwarding child device by using the general-purposephysical server and the NFV technology, refer to the embodiment of FIG.6.

It should be understood that, the controller 1210A and the firstforwarding child device 1200A in the first PE device 1300 in anembodiment may implement various functions and operations implemented bythe first PE device in the method embodiments. For brevity, details arenot described herein again. In addition, only the first PE device isused as an example for description in an embodiment. It should beunderstood that the second PE device or more PE devices have samefunctions as the first PE device. Details are not described hereinagain.

In addition, an embodiment of the application provides a computerstorage medium, configured to store a computer software instruction usedby the first PE device, and the computer software instruction includes aprogram designed for performing the foregoing method embodiment.

An embodiment of the application further includes an EVPN-VPWS networksystem. The EVPN-VPWS network system includes a first PE device. Thefirst PE device is the first PE device in FIG. 5, FIG. 6, FIG. 7, orFIG. 8.

Method or algorithm operations described in combination with the contentdisclosed in the application may be implemented by hardware, or may beimplemented by a processor by executing a software instruction. Thesoftware instruction may be formed by a corresponding software module.The software module may be located in a RAM memory, a flash memory, aROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk,a removable hard disk, a CD-ROM, or a storage medium of any other formknown in the art. For example, a storage medium is coupled to aprocessor, so that the processor can read information from the storagemedium, and may write information into the storage medium. Certainly,the storage medium may be a component of the processor. The processorand the storage medium may be located in the ASIC. In addition, the ASICmay be located in user equipment. Certainly, the processor and thestorage medium may exist in the user equipment as discrete components.

One of ordinary skill in the art should be aware that in the foregoingone or more examples, functions described in the application may beimplemented by hardware, software, firmware, or any combination thereof.When embodiments of the invention are implemented by software, theforegoing functions may be stored in a computer readable medium ortransmitted as one or more instructions or code in the computer readablemedium. The computer readable medium includes a computer storage mediumand a communications medium, where the communications medium includesany medium that enables a computer program to be transmitted from oneplace to another. The storage medium may be any available mediumaccessible to a general-purpose or dedicated computer.

Objectives, technical solutions, and beneficial effects of theapplication have been described in further detail with reference to thespecific embodiments. It should be understood that the foregoingdescriptions are not limited to the specific embodiments of theapplication.

1. A packet processing method, wherein the method is applied to anEthernet virtual private network-virtual private wire service(EVPN-VPWS) network, the EVPN-VPWS network comprises a first provideredge (PE) device, a second PE device, and a third PE device, and themethod comprises: receiving, by the first PE device, a first virtualextensible local area network (VXLAN) packet through a firstpoint-to-point virtual extensible local area network (P2P VXLAN) tunnelbetween the first PE device and the third PE device, wherein the firstVXLAN packet is a VXLAN packet sent by the third PE device to a customeredge (CE) device via the first P2P VXLAN tunnel, the first PE device,and a first Ethernet link, the CE device is dual-homed to the first PEdevice and the second PE device respectively through the first Ethernetlink and a second Ethernet link, and the first Ethernet link and thesecond Ethernet link form an Ethernet segment (ES); and forwarding, bythe first PE device, the first VXLAN packet to the second PE devicethrough a third P2P VXLAN tunnel from the first PE device to the secondPE device when the first PE device determines a fault on the firstEthernet link, wherein the first Ethernet link connected to the first PEdevice and a link formed by the third P2P VXLAN tunnel and the secondEthernet link have a primary/secondary relationship.
 2. The methodaccording to claim 1, wherein before the receiving, by the first PEdevice, the first VXLAN packet through the first P2P VXLAN tunnel, themethod further comprises: receiving, by the first PE device, a firstEthernet auto-discovery per EVPN instance (Ethernet A-D per EVI) routesent by the second PE device, wherein the first Ethernet A-D per EVIroute comprises an Ethernet segment identifier (ESI) and an Ethernet tagidentifier (Ethernet Tag ID), the ESI is used to indicate the ES, andthe Ethernet Tag ID comprises a local virtual private wire service(VPWS) instance identifier and a remote VPWS instance identifier of thesecond PE device; and when the ESI in the first Ethernet A-D per EVIroute is the same as an ESI stored on the first PE device, the localVPWS instance identifier of the second PE device in the first EthernetA-D per EVI route is the same as a local VPWS instance identifier of thefirst PE device, and the remote VPWS instance identifier of the secondPE device in the first Ethernet A-D per EVI route is the same as aremote VPWS instance identifier of the first PE device, establishing, bythe first PE device, the third P2P VXLAN tunnel from the first PE deviceto the second PE device.
 3. The method according to claim 1, wherein theforwarding, by the first PE device, the first VXLAN packet to the secondPE device through the third P2P VXLAN tunnel: when the fault is on thefirst Ethernet link, blocking, by the first PE device, a port of thefirst PE device for connecting to the first Ethernet link, and enablinga port of the first PE device for connecting to the third P2P VXLANtunnel; and forwarding, by the first PE device, the first VXLAN packetto the CE device through the third P2P VXLAN tunnel and the secondEthernet link.
 4. The method according to claim 3, further comprising:when the first Ethernet link is recovered from the fault, enabling, bythe first PE device, the port of the first PE device for connecting tothe first Ethernet link, and blocking the port of the first PE devicefor connecting to the third P2P VXLAN tunnel; and receiving, by thefirst PE device, a second VXLAN packet from the third PE device, andforwarding the second VXLAN packet to the CE device through the firstEthernet link.
 5. The method according to claim 1, wherein the firstEthernet link and the second Ethernet link are multi-chassis trunk(MC-Trunk) links, the first Ethernet link is a primary link, the secondEthernet link is a secondary link, the first PE device is a primarydevice, the second PE device is a secondary device, and when the faultis on the first Ethernet link, the method further comprises: sending, bythe first PE device, a first MC-Trunk packet to the second PE device,wherein the first MC-Trunk packet is used to notify the second PE devicethat the first Ethernet link is faulty; and sending, by the first PEdevice, a second Ethernet A-D per EVI route to the third PE device,wherein the second Ethernet A-D per EVI route carries a P identifier anda B identifier, and the P identifier is not set and the B identifier isset to indicate that the first PE device is switched from the primarydevice to the secondary device.
 6. The method according to claim 5,wherein when the first Ethernet link is recovered from the fault, themethod further comprises: sending, by the first PE device, a thirdEthernet A-D per EVI route to the third PE device, wherein the thirdEthernet A-D per EVI route carries a P identifier and a B identifier,and the P identifier is set and the B identifier is not set to indicatethat the first PE device is switched from the secondary device to theprimary device; receiving, by the first PE device, a third VXLAN packetthrough a fourth P2P VXLAN tunnel, wherein the third VXLAN packet is aVXLAN packet sent by the third PE device to the CE device via the secondP2P VXLAN tunnel, the second PE device, and the second Ethernet link,and the fourth P2P VXLAN tunnel is a P2P VXLAN tunnel from the second PEdevice to the first PE device; and forwarding, by the first PE device,the third VXLAN packet to the CE device through the first Ethernet link.7. The method according to claim 1, wherein the first Ethernet link andthe second Ethernet link are primary links, and the first PE device andthe second PE device are configured to receive traffic from the third PEdevice in a traffic balancing manner.
 8. The method according to claim7, further comprising: sending, by the first PE device, an Ethernetauto-discovery per Ethernet segment (Ethernet A-D per ES) withdrawalroute to the third PE device through the first P2P VXLAN tunnel.
 9. Afirst provider edge (PE) device, wherein the first PE device is deployedin an Ethernet virtual private network-virtual private wire service(EVPN-VPWS) network, the EVPN-VPWS network comprises a second PE deviceand a third PE device, and the first PE device comprises: a receiverconfigured to receive a first virtual extensible local area network(VXLAN) packet through a first point-to-point virtual extensible localarea network (P2P VXLAN) tunnel between the first PE device and thethird PE device, wherein the first VXLAN packet is a VXLAN packet sentby the third PE device to a customer edge (CE) device via the first P2PVXLAN tunnel, the first PE device, and a first Ethernet link, the CEdevice is dual-homed to the first PE device and the second PE devicerespectively through the first Ethernet link and a second Ethernet link,and the first Ethernet link and the second Ethernet link form anEthernet segment (ES); a processor, configured to determine a fault onthe first Ethernet link; and a transmitter, configured to forward thefirst VXLAN packet to the second PE device through a third P2P VXLANtunnel from the first PE device to the second PE device, wherein thefirst Ethernet link connected to the first PE device and a link formedby the third P2P VXLAN tunnel and the second Ethernet link have aprimary/secondary relationship.
 10. The first PE device according toclaim 9, wherein before the receiver receives the first VXLAN packetthrough the first P2P VXLAN tunnel, the receiver is further configuredto receive a first Ethernet auto-discovery per EVPN instance (EthernetA-D per EVI) route sent by the second PE device, wherein the firstEthernet A-D per EVI route comprises an Ethernet segment identifier(ESI) and an Ethernet tag identifier (Ethernet Tag ID), the ESI is usedto indicate the ES, and the Ethernet Tag ID comprises a local virtualprivate wire service VPWS instance identifier and a remote VPWS instanceidentifier of the second PE device; and when the processor determinesthat the ESI in the first Ethernet A-D per EVI route is the same as anESI stored on the first PE device, that the local VPWS instanceidentifier of the second PE device in the first Ethernet A-D per EVIroute is the same as a local VPWS instance identifier of the first PEdevice, and that the remote VPWS instance identifier of the second PEdevice in the first Ethernet A-D per EVI route is the same as a remoteVPWS instance identifier of the first PE device, the processor isfurther configured to establish the third P2P VXLAN tunnel from thefirst PE device to the second PE device.
 11. The first PE deviceaccording to claim 9, wherein when the processor determines a fault onthe first Ethernet link, the processor is further configured to block aport of the first PE device for connecting to the first Ethernet link,and enable a port of the first PE device for connecting to the third P2PVXLAN tunnel.
 12. The first PE device according to claim 11, whereinwhen the processor determines that the first Ethernet link is recoveredfrom the fault, the processor is further configured to enable the portof the first PE device for connecting to the first Ethernet link, andblock the port of the first PE device for connecting to the third P2PVXLAN tunnel; the receiver is further configured to receive a secondVXLAN packet from the third PE device; and the transmitter is furtherconfigured to forward the second VXLAN packet to the CE device throughthe first Ethernet link.
 13. The first PE device according to claim 9,wherein the first Ethernet link and the second Ethernet link aremulti-chassis trunk (MC-Trunk) links, the first Ethernet link is aprimary link, the second Ethernet link is a secondary link, the first PEdevice is a primary device, the second PE device is a secondary device,and when the processor determines the fault on the first Ethernet link,the transmitter is further configured to send a first MC-Trunk packet tothe second PE device, wherein the first MC-Trunk packet is used tonotify the second PE device that the first Ethernet link is faulty; andthe transmitter is further configured to send a second Ethernet A-D perEVI route to the third PE device, wherein the second Ethernet A-D perEVI route carries a P identifier and a B identifier, and the Pidentifier is not set and the B identifier is set to indicate that thefirst PE device is switched from the primary device to the secondarydevice.
 14. The first PE device according to claim 13, wherein when theprocessor determines that the first Ethernet link is recovered from thefault, the transmitter is further configured to send a third EthernetA-D per EVI route to the third PE device, wherein the third Ethernet A-Dper EVI route carries a P identifier and a B identifier, and the Pidentifier is set and the B identifier is not set, which is used toindicate that the first PE device is switched from the secondary deviceto the primary device; the receiver is further configured to receive athird VXLAN packet through the fourth P2P VXLAN tunnel, wherein thethird VXLAN packet is a VXLAN packet sent by the third PE device to theCE device via the second P2P VXLAN tunnel, the second PE device, and thesecond Ethernet link, and the fourth P2P VXLAN tunnel is a P2P VXLANtunnel from the second PE device to the first PE device; and thetransmitter is further configured to forward the third VXLAN packet tothe CE device through the first Ethernet link.
 15. The first PE deviceaccording to claim 9, wherein the first Ethernet link and the secondEthernet link are both-primary links, and the first PE device and thesecond PE device are configured to receive traffic from the third PEdevice in a traffic balancing manner.
 16. The first PE device accordingto claim 15, wherein the transmitter is further configured to send anEthernet auto-discovery per Ethernet segment (Ethernet A-D per ES)withdrawal route to the third PE device through the first P2P VXLANtunnel.
 17. An Ethernet virtual private network-virtual private wireservice (EVPN-VPWS) network system, wherein the EVPN-VPWS networkcomprises a first provider edge (PE) device, and the first PE device isthe first PE device according to claim 9.